package com.wwh.wwhspringmvc.Handler;

import java.lang.reflect.Method;

/**
 * @author Albert
 * @date 2024/9/5-21:10
 * @describe 用来记录请求的URL和控制器的关系
 */
public class WwhHandler {
    private String url;
    private Object Handler;
    private Method method;

    public WwhHandler(String url, Object handler, Method method) {
        this.url = url;
        Handler = handler;
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object getHandler() {
        return Handler;
    }

    public void setHandler(Object handler) {
        Handler = handler;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    @Override
    public String toString() {
        return "WwhHandler{" +
                "url='" + url + '\'' +
                ", Handler=" + Handler +
                ", method=" + method +
                '}';
    }
}
